package com.citywithincity.api.post;

import com.citywithincity.api.post.impl.BsApiPost;
import com.citywithincity.api.post.impl.DefaultApiPost;
import com.citywithincity.api.post.impl.JsonApiPost;
import com.citywithincity.api.post.impl.MchApiPost;
import com.citywithincity.api.post.impl.ShareApiPost;
import com.citywithincity.api.post.impl.ShareChargePost;
import com.damai.action.factories.MchJsonActionFactory;

public class ApiPostFactory {
	
	private String baseUrl;
	
	public ApiPostFactory(String baseUrl){
		this.baseUrl = baseUrl;
	}
	
	public ApiPost createDefault(String account,String pwd){
		return new DefaultApiPost(baseUrl, account, pwd);
	}
	
	public ApiPost createShareCharge(String deviceId) {
		return new ShareChargePost(baseUrl,deviceId);
	}
	
	public ApiPost createBs(String account,String pwd){
		return new BsApiPost(baseUrl, account, pwd);
	}
	public ApiPost createBsAutoLogin(String account,String pwd){
		return new BsApiPost(baseUrl, account, pwd);
	}
	
	public ApiPost createSimpleJson(){
		return new JsonApiPost(baseUrl);
	}

	public ApiPost createMch(String mchId, String key) {
		return new MchApiPost(baseUrl,mchId,key);
	}

	public ApiPost createMch() {
		return new MchApiPost(baseUrl,"mch20170001","f403814189edab87fc569545a8984739");
	}
	public ApiPost createShare(String phone){
		return new ShareApiPost(baseUrl, phone);
	}
}
